using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SnsObjectOpRequest : GeneratedMessageLite<SnsObjectOpRequest, SnsObjectOpRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SnsObjectOpRequest, SnsObjectOpRequest.Builder>
		{
			private bool resultIsReadOnly;
			private SnsObjectOpRequest result;
			protected override SnsObjectOpRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SnsObjectOpRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SnsObjectOpRequest DefaultInstanceForType
			{
				get
				{
					return SnsObjectOpRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public uint OpCount
			{
				get
				{
					return this.result.OpCount;
				}
				set
				{
					this.SetOpCount(value);
				}
			}
			public IPopsicleList<SnsObjectOp> OpListList
			{
				get
				{
					return this.PrepareBuilder().opList_;
				}
			}
			public int OpListCount
			{
				get
				{
					return this.result.OpListCount;
				}
			}
			public Builder()
			{
				this.result = SnsObjectOpRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SnsObjectOpRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SnsObjectOpRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SnsObjectOpRequest other = this.result;
					this.result = new SnsObjectOpRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SnsObjectOpRequest.Builder Clear()
			{
				this.result = SnsObjectOpRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SnsObjectOpRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SnsObjectOpRequest.Builder(this.result);
				}
				return new SnsObjectOpRequest.Builder().MergeFrom(this.result);
			}
			public override SnsObjectOpRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SnsObjectOpRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is SnsObjectOpRequest)
				{
					return this.MergeFrom((SnsObjectOpRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SnsObjectOpRequest.Builder MergeFrom(SnsObjectOpRequest other)
			{
				return this;
			}
			public override SnsObjectOpRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SnsObjectOpRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SnsObjectOpRequest._snsObjectOpRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SnsObjectOpRequest._snsObjectOpRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasOpCount = input.ReadUInt32(ref this.result.opCount_);
							continue;
						}
						if (num3 == 26u)
						{
							input.ReadMessageArray<SnsObjectOp>(num, text, this.result.opList_, SnsObjectOp.DefaultInstance, extensionRegistry);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public SnsObjectOpRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public SnsObjectOpRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public SnsObjectOpRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public SnsObjectOpRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public SnsObjectOpRequest.Builder SetOpCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasOpCount = true;
				this.result.opCount_ = value;
				return this;
			}
			public SnsObjectOpRequest.Builder ClearOpCount()
			{
				this.PrepareBuilder();
				this.result.hasOpCount = false;
				this.result.opCount_ = 0u;
				return this;
			}
			public SnsObjectOp GetOpList(int index)
			{
				return this.result.GetOpList(index);
			}
			public SnsObjectOpRequest.Builder SetOpList(int index, SnsObjectOp value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.opList_[index] = value;
				return this;
			}
			public SnsObjectOpRequest.Builder SetOpList(int index, SnsObjectOp.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.opList_[index] = builderForValue.Build();
				return this;
			}
			public SnsObjectOpRequest.Builder AddOpList(SnsObjectOp value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.opList_.Add(value);
				return this;
			}
			public SnsObjectOpRequest.Builder AddOpList(SnsObjectOp.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.opList_.Add(builderForValue.Build());
				return this;
			}
			public SnsObjectOpRequest.Builder AddRangeOpList(IEnumerable<SnsObjectOp> values)
			{
				this.PrepareBuilder();
				this.result.opList_.Add(values);
				return this;
			}
			public SnsObjectOpRequest.Builder ClearOpList()
			{
				this.PrepareBuilder();
				this.result.opList_.Clear();
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int OpCountFieldNumber = 2;
		public const int OpListFieldNumber = 3;
		private static readonly SnsObjectOpRequest defaultInstance;
		private static readonly string[] _snsObjectOpRequestFieldNames;
		private static readonly uint[] _snsObjectOpRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasOpCount;
		private uint opCount_;
		private PopsicleList<SnsObjectOp> opList_ = new PopsicleList<SnsObjectOp>();
		private int memoizedSerializedSize = -1;
		public static SnsObjectOpRequest DefaultInstance
		{
			get
			{
				return SnsObjectOpRequest.defaultInstance;
			}
		}
		public override SnsObjectOpRequest DefaultInstanceForType
		{
			get
			{
				return SnsObjectOpRequest.DefaultInstance;
			}
		}
		protected override SnsObjectOpRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public uint OpCount
		{
			get
			{
				return this.opCount_;
			}
		}
		public IList<SnsObjectOp> OpListList
		{
			get
			{
				return this.opList_;
			}
		}
		public int OpListCount
		{
			get
			{
				return this.opList_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasBaseRequest)
				{
					return false;
				}
				if (!this.hasOpCount)
				{
					return false;
				}
				if (!this.BaseRequest.IsInitialized)
				{
					return false;
				}
				bool result;
				using (IEnumerator<SnsObjectOp> enumerator = this.OpListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						SnsObjectOp current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							result = false;
							return result;
						}
					}
					return true;
				}
				return result;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasOpCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.OpCount);
				}
				using (IEnumerator<SnsObjectOp> enumerator = this.OpListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						SnsObjectOp current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(3, current);
					}
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SnsObjectOpRequest()
		{
		}
		public SnsObjectOp GetOpList(int index)
		{
			return this.opList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] snsObjectOpRequestFieldNames = SnsObjectOpRequest._snsObjectOpRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, snsObjectOpRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasOpCount)
			{
				output.WriteUInt32(2, snsObjectOpRequestFieldNames[1], this.OpCount);
			}
			if (this.opList_.Count > 0)
			{
				output.WriteMessageArray<SnsObjectOp>(3, snsObjectOpRequestFieldNames[2], this.opList_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasOpCount)
			{
				num ^= this.opCount_.GetHashCode();
			}
			using (IEnumerator<SnsObjectOp> enumerator = this.opList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					SnsObjectOp current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SnsObjectOpRequest snsObjectOpRequest = value as SnsObjectOpRequest;
			if (snsObjectOpRequest == null)
			{
				return false;
			}
			if (this.hasBaseRequest != snsObjectOpRequest.hasBaseRequest || (this.hasBaseRequest && !this.baseRequest_.Equals(snsObjectOpRequest.baseRequest_)))
			{
				return false;
			}
			if (this.hasOpCount != snsObjectOpRequest.hasOpCount || (this.hasOpCount && !this.opCount_.Equals(snsObjectOpRequest.opCount_)))
			{
				return false;
			}
			if (this.opList_.Count != snsObjectOpRequest.opList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.opList_.Count; i++)
			{
				if (!this.opList_[i].Equals(snsObjectOpRequest.opList_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SnsObjectOpRequest, SnsObjectOpRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<SnsObjectOpRequest, SnsObjectOpRequest.Builder>.PrintField("OpCount", this.hasOpCount, this.opCount_, writer);
			GeneratedMessageLite<SnsObjectOpRequest, SnsObjectOpRequest.Builder>.PrintField<SnsObjectOp>("OpList", this.opList_, writer);
		}
		public static SnsObjectOpRequest ParseFrom(byte[] data)
		{
			return SnsObjectOpRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SnsObjectOpRequest MakeReadOnly()
		{
			this.opList_.MakeReadOnly();
			return this;
		}
		public static SnsObjectOpRequest.Builder CreateBuilder()
		{
			return new SnsObjectOpRequest.Builder();
		}
		public override SnsObjectOpRequest.Builder ToBuilder()
		{
			return SnsObjectOpRequest.CreateBuilder(this);
		}
		public override SnsObjectOpRequest.Builder CreateBuilderForType()
		{
			return new SnsObjectOpRequest.Builder();
		}
		public static SnsObjectOpRequest.Builder CreateBuilder(SnsObjectOpRequest prototype)
		{
			return new SnsObjectOpRequest.Builder(prototype);
		}
		static SnsObjectOpRequest()
		{
			SnsObjectOpRequest.defaultInstance = new SnsObjectOpRequest().MakeReadOnly();
			SnsObjectOpRequest._snsObjectOpRequestFieldNames = new string[]
			{
				"BaseRequest",
				"OpCount",
				"OpList"
			};
			SnsObjectOpRequest._snsObjectOpRequestFieldTags = new uint[]
			{
				10u,
				16u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.SnsObjectOpRequest.Descriptor, null);
		}
	}
}
